package cn.pxs.service;

import cn.pxs.dao.CommentDao;
import cn.pxs.entity.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService{
    @Autowired
    CommentDao dao;

    @Override
    public void add(Comment comment) {
        dao.add(comment);
    }

    @Override
    public void delById(String id) {
        dao.delById(id);
    }

    @Override
    public List<Comment> findAll() {
        return dao.findAll();
    }

    @Override
    public List<Comment> findByUid(String uid) {
        return dao.findByUid(uid);
    }

    @Override
    public Comment findById(String id) {
        return dao.findById(id);
    }
}
